{extend name="common@create" /}
{block name="formaa"}
	<form action="/xueqi/{$list.id}" method="PUT" class="form form-horizontal" id="form-member-add">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>标题：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$list.title}" placeholder="标题" id="title" name="title">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>学年：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$list.xuenian}" placeholder="例如：2018-2019学年度" id="xuenian" name="xuenian">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>分类：</label>
			<div class="formControls col-xs-8 col-sm-9 f-l">
				<span class="select-box f-l" style="width:180px;">
				{php}$category = getCategory(108);{/php}
				<select class="select" id="category" name="category" size="1" required>
					<option value="">--请选择学期分类--</option>
					{volist name="category" id="vo"}
						<option value="{$vo.id}" {eq name="$list.category" value="$vo.title" }selected{/eq}>{$vo.title}</option>
					{/volist}
				</select>
				</span>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>起始时间：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text Wdate" style="max-width:120px" value="{$list.bfdate}" placeholder="" id="bfdate" name="bfdate" onclick="WdatePicker({isShowClear:false,readOnly:true})">
				<span class="ml-10">~</span>
				<input type="text" class="input-text Wdate ml-10" style="max-width:120px" value="{$list.enddate}" placeholder="" id="enddate" name="enddate" onclick="WdatePicker({isShowClear:false,readOnly:true})">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
{/block}
{block name="yanzheng"}
<script type="text/javascript">
	// 设置表单验证规则
	var myrules = {
			title:{
				required:true,
				rangelength:[2,25]
			},
			xuenian:{
				required:true,
				rangelength:[1,15]
			},
			bfdate:{
				required:true,
				dateISO:true
			},
			enddate:{
				required:true,
				dateISO:true
			},
		};

	// 设置表单提交方式
	var mytype = 'PUT';
</script>
{/block}